<template>
  <div>
    <el-descriptions class="margin-top" direction="vertical" :column="1" border>
      <el-descriptions-item>
        <template slot="label" disabled>
          <i class="el-icon-user"></i>
          工号
        </template>
        <span>{{ admin_id }} </span>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          用户名
        </template>
        {{ user_name }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          姓名
        </template>
        {{ admin_name }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          密码
        </template>
        {{ user_password }}
        <el-button icon="el-icon-view" size="mini" circle @click="viewpassword"  style="float:right"></el-button>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          手机号码
        </template>
        {{ phone }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-tickets"></i>
          身份
        </template>
        <el-tag size="small">管理员</el-tag>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
export default {
    data() {
    return {
      admin_id: JSON.parse(sessionStorage.getItem("admin")).admin_id,
      user_name: JSON.parse(sessionStorage.getItem("admin")).user_name,
      user_password: '*******',
      admin_name: JSON.parse(sessionStorage.getItem("admin")).admin_name,
      phone:  JSON.parse(sessionStorage.getItem("admin")).phone
    };
  },
    methods: {
        viewpassword(){
      this.user_password=JSON.parse(sessionStorage.getItem("admin")).user_password;
    }
  }
}
</script>

<style>

</style>